package com.iot.core.receiver.tocloud;

import com.iot.core.base.IotMessage;
import com.iot.core.base.IotSubTopic;
import com.iot.core.receiver.BaseReceiver;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * @auther 王霄
 * @date 2022/7/28 10:49
 */
@Component
@Slf4j
public class ToCloudReceiver implements BaseReceiver {
    @Override
    public IotSubTopic getSubTopic() {
        return IotSubTopic.TO_CLOUD;
    }

    @Override
    public void receive(IotMessage iotMessage) {
        log.info("接收设备发送云端消息，主题: " + iotMessage.getTopic() + ",消息载荷: " + iotMessage.getPayload());
    }
}
